/*
 * LandBean.java
 *
 * Created on 14 avril 2007, 20:44
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Session;

import Entity.Entreprise;
import Entity.Joueur;
import Entity.Land;
import Entity.Landien;
import Entity.MaitreDuJeu;
import java.util.List;
import java.util.Vector;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author amo
 */
@Stateless(mappedName="LandRemote2")
public class LandBean implements Session.LandRemote
{
    
    @PersistenceContext
    private EntityManager em;
    
    /** Creates a new instance of LandBean */
    public LandBean()
    {
    }
    
    public void merge(int id,Land l)
    {
        Land o = em.find(Land.class, id);
        em.merge(l);
        
    }
    public void persist(Object object)
    {
        // TODO:
        
        em.persist(object);
        
    }
    
    public Land getLeLand(int idLand)
    {
        Land o = em.find(Land.class, idLand);
        if(o==null)
        {
            return null;
        }
        else
        {
            return o;
        }
    }
    
}
